import { fileURLToPath, URL } from "node:url";

import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { mars3dPlugin } from "vite-plugin-mars3d";

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [vue(), mars3dPlugin()],
    resolve: {
        alias: {
            "@": fileURLToPath(new URL("./src", import.meta.url)),
        },
    },
    server: {
        port: 9999,
        // proxy: {
        //     "/equipment": {
        //         target: "http://192.168.0.100:4008/equipment", // 目标服务器地址
        //         changeOrigin: true, // 改变源到目标地址
        //         rewrite: (path) => path.replace(/^\/equipment/, ""), // 重写路径
        //     },
        // },
    },
});
